<!--

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<div class="gv-page-container">
  <h1>Login</h1>
  <div class="gv-page-content">
    <div fxFlex="70">
      <form (ngSubmit)="save()" fxLayout="column">
        <div class="gv-form-section">
          <div fxLayout="column">
            <mat-slide-toggle
              (change)="enableRegistration($event)"
              [checked]="isRegistrationEnabled()" [disabled]="readonly">
              User registration
            </mat-slide-toggle>
            <mat-hint style="font-size: 75%;">Enable self user registration. A link to the create account service will be available through the login page.</mat-hint>
          </div>
          <div fxLayout="column" style="margin-top: 10px;">
            <mat-slide-toggle
              (change)="enableForgotPassword($event)"
              [checked]="isForgotPasswordEnabled()" [disabled]="readonly">
              Forgot password
            </mat-slide-toggle>
            <mat-hint style="font-size: 75%;">Enable Self-service password reset (SSPR) that allows users who have forgotten their password to ask for a new one.</mat-hint>
          </div>
        </div>
        <div fxLayout="row" *hasPermission="['domain_settings_update']">
          <button mat-raised-button [disabled]="!formChanged" type="submit">SAVE</button>
        </div>
      </form>
    </div>
    <div class="gv-page-description" fxFlex>
      <h3>Login settings</h3>
      <div class="gv-page-description-content">
        <p>Features which will be available on the login page.</p>
      </div>
    </div>
  </div>
</div>
